﻿@model Parichay.Domain.Models.ChangePasswordModel

@{
    
    ViewBag.Title = "Change Password";
}

<h2>Change Password</h2>
<p>
    Use the form below to change your password. 
</p>
<p>
    New passwords are required to be a minimum of @Membership.MinRequiredPasswordLength characters in length.
</p>

<script src="@Url.Content("~/Content/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Content/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true, "Password change was unsuccessful. Please correct the errors and try again.")
    <div>
        <fieldset>
            <legend><b>Change Password</b></legend>
            <table class="tblAllBorders">
            <tr><th><div class="editor-label">
                @Html.LabelFor(m => m.OldPassword)
            </div>
            </th><td><div class="editor-field">
                @Html.PasswordFor(m => m.OldPassword)
                @Html.ValidationMessageFor(m => m.OldPassword)
            </div></td></tr>

            <tr><th><div class="editor-label">
                @Html.LabelFor(m => m.NewPassword)
            </div>
            </th><td><div class="editor-field">
                @Html.PasswordFor(m => m.NewPassword)
                @Html.ValidationMessageFor(m => m.NewPassword)
            </div></td></tr>

            <tr><th><div class="editor-label">
                @Html.LabelFor(m => m.ConfirmPassword)
            </div>
            </th><td><div class="editor-field">
                @Html.PasswordFor(m => m.ConfirmPassword)
                @Html.ValidationMessageFor(m => m.ConfirmPassword)
            </div></td></tr>
            <tr><td colspan="2" style="text-align:right"> <input type="submit" value="Change Password" /></td></tr>
            </table>
        </fieldset>
    </div>
}
@Html.ActionLink("Back to Home","Index") 